package com.hj.system.system.dao;

import com.hj.system.system.domain.DeptDO;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


/**
 * 部门管理
 *
 * @author wxf
 */
@Repository
public interface DeptDao {

    DeptDO get(String deptId);


    List<DeptDO> list(Map<String, Object> map);

    int count(Map<String, Object> map);

    @CacheEvict(value = "depts", key = "'depts'")
    int save(DeptDO dept);

    @CacheEvict(value = "depts", key = "'depts'")
    int update(DeptDO dept);

    @CacheEvict(value = "depts", key = "'depts'")
    int remove(String deptId);

    @CacheEvict(value = "depts", key = "'depts'")
    int batchRemove(String[] deptIds);

    int getDeptUserNumber(String deptId);
}
